{
 "cells": [
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "# SymPy Examples"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "This example is related to the article [*Computer Algebra with Jupyter and SymPy*](https://jaantollander.com/post/computer-algebra-with-sympy-and-jupyter/). It contains a showcase of the essential features of SymPy. The Sympy webpage contains the full list of [features](https://www.sympy.org/en/features.html) and [documentation](https://docs.sympy.org/latest/index.html)."
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Imports and Printing"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Import SymPy and initialize the printing of SymPy expressions with MathJax."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "metadata": {},
   "outputs": [],
   "source": [
    "from sympy import *\n",
    "init_printing(\"mathjax\") # sympy expression printing"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "Import SymEngine and initialize the printing of SymEngine expressions with MathJax. SymEngine is a fast symbolic manipulation library written in C++ instead of Python. SymEngine has Python wrappers that integrate with Sympy, although Symengine does not yet support all of SymPy's functionality. We can override some of the SymPy functions with SymEngine variants for improved performance.  It is wise to import only computationally critical functions."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "#from symengine import *  # overrides some sympy functions\n",
    "#init_printing(\"mathjax\") # symengine expression printing"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Define Symbols and Functions"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`symbols`, `Symbol`, `Function`, `sympify`, `S`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "x = symbols(\"x\")\n",
    "a,b,c = symbols(\"a,b,c\", real=True)\n",
    "i,j,n = symbols(\"i,j,n\", integer=True)\n",
    "f = symbols(\"f\", cls=Function)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAADoAAAAUCAYAAADcHS5uAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAHeZh94AAACS0lEQVR4nOXXT2gdVRgF8F/UhaFoA8kiIAiKJnRRDJZCXCRSaBV3BQvdSFsKpQi1IIRCQPj6CbUbTaEgblzEhaBCEUEXrgpiwT+FdqeLLtqKBFKt+KdU0PK6yMzLZPqCfZO8F4IHhm/m3Jl7zpm5M/fOQKvV8n/AAxttoF94qBOZmR/gJTwREbf6a6k5MnMHLuJIRLxfbRuoD93M3IlvMRMRcxV+H57HBJ7BI/gwIl7psfmudDPzU0zi6Yj4q+Q7Dd1T+APv1fg3cKwQ/Hlt9rtCt7qnMYrjVXJF0Mwcw258EhG3ax28jjE8ilcbWW6GrnQj4jv8iKOZ2c5Xf0cPYwAfd+jgfLmfmc0sN0BD3Y9wEnvwJfcO3d24g2/W7HBjcaGoe0qiHTQzt1h6D37YTF/aVfB9UadLovpEH8ODWOino14gIn7H33i85KpBh4v6Wz9N9RA3MVIeVIOWX9mH+2qndxi0nGlF0MWiDtvkKKaVIcuZVgRdwA2M99dWTzBuaZq8XBLtoBHRwlcYycyn1kMtM+czs5WZh9ajvy4wWdT2HFxfMJzDy3gRV6oNmbkXe4vD0aI+l5nzxf4vETFT66+8kf82ddxQ9wVL64HPSqJT0EUcwLu1tgkcrHFPFhtcQ11wO/7EF6sFuQ90pZuZWy3dmM8j4qeS7/T3Mou38GxEXGrqLjOH8CveiYgTTftpoPsazmIqIr4u+U5/L2dwHW+uUXMK/2Duv05cL2TmIGZxrhqSDk+0uGAau/D2ZloOZuY27Md8RFyttt0FUlyv+v4UlRcAAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle \\left( 1, \\  1\\right)$"
      ],
      "text/plain": [
       "(1, 1)"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "sympify(1), S(1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAAYAAAAQCAYAAAA1Qw7OAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAHeZh94AAAAgElEQVR4nJWPMQrCQBBF30rAwnsISSNILpArWdkNv9creYRNQLDIOVKkCKzNJsRlt3Cagf/4/8+4EAK5OWRVoEoFSTfgmXO0pag7ULtS+U+HpA54AY806hq3/wtMwLgBSSfgDAxmFvaOSzzfp3+s+X0JZB0z8NmApCPQAG8zWwC+k3Yfgpsyk+kAAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle i$"
      ],
      "text/plain": [
       "ⅈ"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "I  # imaginary unit"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Notations"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`Rational`, `Sum`, `Product`, `I`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAB8AAAASCAYAAACjMAXnAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAHeZh94AAAB3UlEQVR4nMXVzYvNcRTH8dc1kyywsaBkYdbEQtnIY6I8zR3sMP/AJKJEdJwF2SElRc1sWKghC4+LmbCiFJEs5Ck0aSgLJcyMxf1NjTt3HtxbnPr17Zzvp/PunPP9fb+loaEh/8uaRzqZuQ0rsBiLMAMXI2LHeEkyczY+4iyOoowNWIi5+IGn6ERnRAzClKo8h9FRwD/8RRFbilxXsB3nsRQPcArdWIALuJyZpVGVYy/e46VKB3onCS/jM+6hhM24PlwhZOYhPMRWtKH7D3hE9I4QT4qamTOxGpciYgA9tXQR0ZeZ53AMK9Fd3fZ6bCOm4uoktD+L9RejZ16PlfENd8YTZWYzdhXurYbhmTkN63EzIr5PID+hcuhuRMTthuFYi+kmaHlm7sY+vMDO4Xij8DaVf/j6OOAOnMZzrIqILw3DM7MJm9ATEV/H0OzBGTwrwH0j9xupfDlmGaPlmXkAJ/G4AH+q1jQCL2MQ12qAj6gcsEdYExH9tRKURj4smdmK1sKdg3V4hftFrD8i9hfX41u8i4hlVeB2dGFApeW1RvImIrqqr9fFaK+KtRSfArgfSzBP5d6utvnF2oQ9NfbhLrpK9TypmXkcB9ESEa//OkFh9c68jCeNgKma+b+239xjmLJ2Pe8KAAAAAElFTkSuQmCC\n",
      "text/latex": [
       "$\\displaystyle \\frac{1}{2}$"
      ],
      "text/plain": [
       "1/2"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Rational(1, 2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAADAAAAA1CAYAAAAHz2g0AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAHeZh94AAAEL0lEQVR4nO2aXYhVVRTHf1MmZQaR9CI2LwlhRTNjPsyDSGTNNErQx0NQSgw9BZIZRToYf/9JX/RBEEL4UENRQUhGaKUVRIZBPjiVxFgGUQqFNlHYZAZzezj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5kdynHbHl9qpl1YKqZ4IDtbbZ3TpUxZUjvQpuJvqyrBdsrgIeB64GFQL+kwbr0Q8oBSb/XqRyYDxwCXgt/tfP/NpquOdY9kO2TwLpWzsCEmmNi4AFgIENPX1be3iqSDnSSqDkmeJmoPtOMshf5yqRnYCjdIWSe0yb7TJOegRfSHWZECJ2p5phgRoTQpJpjTJUQsj2f6IdQEB2a7eEyP1LX98bxSTyp5lgTy4h+V3QQuAhweH68rgH+AyTYdeepK/JbAAAAAElFTkSuQmCC\n",
      "text/latex": [
       "$\\displaystyle \\sum_{i=1}^{n} x^{i}$"
      ],
      "text/plain": [
       "  n     \n",
       " ___    \n",
       " ╲      \n",
       "  ╲    i\n",
       "  ╱   x \n",
       " ╱      \n",
       " ‾‾‾    \n",
       "i = 1   "
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Sum(x**i, (i, 1, n))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAFgAAAA1CAYAAADF/yywAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAHeZh94AAAFIElEQVR4nO2cf4gVVRTHP6tGSULBFkWJWYlhhPtDg/5IQXAT+2cjgqDQrIwIpEASTIxvp59KWy1UFCK0WxAVSgUGGZJiZVG77WaRlkbiFmtrWMZWZuX2x72zzc6+9/btvB/zdpwPLPe9c8/cd955Z86cuffO1g0NDTFezGw60AfcANwDLACOACsl7Rz3gClmUszjGny7Gmjz778Cni6HUWkiroMbgd+AmyXtkHQQ2AKcXy7D0kIpEfyOpCMh2SzgYOkmpYtSIvjjiKwJ6C3FmDQybgeb2dnA5UBPpCtzcA7iRPBc3/YGAjOrB6aTOXgUcRzcAByQNBiSNQF/A1+X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JuD/akXiKCJC0G1dRTDgk7cPNoo2iJiI4zRQbwXuBn/3rgUKKIf4CukPvx7rFTCXZ7soKk6WICpM5uMJkDq4wIxxsZs+b2ZtJGZNGolXEetyzFmXBzBbiiu95wEXA7f729bRhhIMl5Vy6KYFpuPnUl/3facdwmRZ6wHuOpP3l/iAzGwRWnc4R3IC7GRixeuuXqteNMc5SSR+U2bZUEHZwI25yO7oc/SJuH0AhfiynUWkiGsG9UQVJx3BL0RkxiEbwqP/3kKWI0pgCIx7w7s2hk6WIEggiOHjAe29UoZQU4TcjB6vFk4AZflHxWNwtqRON4E4ueMC73FOK83GbRnpwO17Mv56QS0Nx+A/2LonuPndWUQAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$\\displaystyle \\prod_{i=1}^{n} \\left(i + x\\right)$"
      ],
      "text/plain": [
       "  n        \n",
       "─┬─┬─      \n",
       " │ │  i + x\n",
       " │ │       \n",
       "i = 1      "
      ]
     },
     "execution_count": 8,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Product(x+i, (i, 1, n))"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Evaluate Expressions Numerically"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`N`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAABcAAAAUCAYAAABmvqYOAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAHeZh94AAABlklEQVR4nLXUz4tNYRgH8M8dlCIb0hRZKPkRK2kkxWpiy2Ys/Co2ip0FNT2ehZopKX+BlLIQJdlIkYWaraKUpsZC7GWSmY7Ffc/tuk7Xne6d7+Y55z3v9/t+nx/vaVVVZbWwdhhyZt5C9Cx/j4jxocULPuF41/ty/TAK8aWI+Nb0YRTiOzPzK35hDjcjYh7GhhSewwWcwGWM411mbobWKKclMzdiHjMRcbexLJl5GpdwCJuwgPuYjYjlJg5ExI/M/IBd9NQ8M9fgIabwGY+1a3kSt7Eb5/s4X489eP2POO4V4RlMR8RSIV3HG5zLzNmI+FjW7+A5vmArprEBD+hqaGZO4AqeRcSNWrik+7smYKLLzHY80p71pyXLwxGx0Ov8Klr4WW5eL/aX2DEUEVMN+zroFp8s8Uw/gnZzB0Krqqq6EYt4GxHHBiX/D3WKrRK3jEq4Ix4Ri3iPfZl5qmljZh4tozowOjc0MyfxQrsPr8phY9iGg1gXETtW7Ly4f4kjeIIDuIaz2FsOu7gS4b+crwaG/Sv2xR/nmX/Rdep+pAAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$\\displaystyle e^{5}$"
      ],
      "text/plain": [
       " 5\n",
       "ℯ "
      ]
     },
     "execution_count": 9,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "exp(5)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAEYAAAAQCAYAAACr+QluAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAHeZh94AAACq0lEQVR4nO3YS6hWVRQH8N+NG0HpqAInESkIOsibQRFBWTgpw0cUOBBqkDUoeliURLVajlJIUhwoGt4ezkQdRERP6ElBDoteYj7QIp0UZQZdB2cbX8f73bvPd70z//Cxz957rf3fa5219l7nGxobG3MB52K4t5OZ9+BWjGABZmJXRKyqWSwzV+GN0l0dETv6yC3BY5iPy3EMX2NjRHzR3Yx6/lobL2rpPYdHitLRjpu6ClvwxyRy6/EWFuIdbMJ+LMNnxbjOqOVXaeNwq/8EjuBHjVc/qtzUEHbiBPbgqT5ys8rcL7g2In7tmbsNH2Id3qzh7cpfUGXj/xwTEf8JZWaXvT2K27GotP1wtSZKv+x1ylnuzPwdV3Yh7shfbWM7lTojM+fhJWyKiI8nEf8Bp3FDZl7RWucWTb6/P4381WinUidk5rDmsDuEZyeTj4iTmfkMNuKbzNynCf85WIr38NB08XfBVCPmBVyH+yPirxqFiHgFd2teymqsxb04jNF2ip1v/loM7JjMvFHzll7ucsVm5tPYjVFNpFyG63EAuzJzw3Ty12KgVCoh/Dq+x/Md9BZhPfZGxJqeqf2ZuaKs92Rmbo2IA+ebvwsGPWNmYG55PtXndN+emds1h+LjZeyu0p5zRUbEn5n5FVZo0qOvY6bAX41BHfM3Xu0zt1Bj2Kf4Dr1hfklp+13JZ8dPTxN/NQZyTDnoHhhvLjNfLBt7bZyS/BNN1flgZm6LiKM9enfgZpzC56015+Bi/BQR/0yBvxrtb6XlWF66s0p7U2aOluffImKiqnIy7NbUKYvxbWbuxXHM06TZENZGxImW3gea4vAaHJwCf7WN7YgZwX2tsdnlBz+buNyeEBHxb2beiYexUnOeXIqTeBubI+LdQdevxIgKG4cu/O0wPs4A6QwaXMyE9LAAAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle 148.41$"
      ],
      "text/plain": [
       "148.41"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "N(_, 5)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Manipulate Expressions"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`expand`, `collect`, `factor`, `simplify`, `.subs`, `.doit`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAKMAAAAUCAYAAADho41NAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwb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X0XWD6GTswKCcghcDpwCvGtmhxPWFwJsdxG9tYThsVccRoNxvx/LSYCZTe2mQ2lYjSOgS+tA0kL/sjlLgZnVxmW+JTEdqD/WloSv8JfiTpZhwCMk5zmF9f1wn+X72FRoDgtXdFvK/M1+bMpSEoLHPDiMXpH7cJE9pqeOdMPRkcA4YEtCIA7FFS5wHJ4oSLoBqAe243zcCdwnKYuHMbj2TWtMHoxDj0IwdsmtJQ0HHgS+pUgw5o28ODwSjGbWAbwHnCvp4pz9LVxNo33eA4Ckclw/bgTuum7tujUcJE0G1gI/AlVmdgCYj7sxsqr6K/y4OSoMzCF0VtK3+8odAP9YrREYBMxOucKDIE8O433GQsOyKh9XHbyDm4BLgE8kveBbATtxj83aga/MrCf5VK/gG8brgYPANF/RY2ZrcenCdElTUrZfh+slvpMwF4RDSQNwp04LcAholbREUh3uic9U4FEz25Cn3SI+VZIjh0nBuB9XTOSN23B540hcLnERrg+1yPuRmS/mCX9qbcD1PavMbFdsyTw/LknYexZwE7DezPYkqA/F4WW4wqgZF3hf4K7lGtwz6mvMrC5nm6kIwWFZ/M+1kubhAmR8Qh/rpIekh4E6YIqZfZCypsRhBtI4TPrXzovAD8DChLmTGpKG4H7x69IC0aPEYQqyOOwSjD5vqwaao0lyCQCMApYDj2UtKnGYiVGkcPgf4y5Qf+M1w+sAAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle \\left(- a + x\\right) \\left(- b + x\\right)$"
      ],
      "text/plain": [
       "(-a + x)⋅(-b + x)"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "(x-a)*(x-b)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAKoAAAAUCAYAAAAdtqaHAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXR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EXUPjuyo7QhJz/i/h4LiaHoaLBP7Hn/sKXdxM1tSIc9KkVRDVLcKl+SfBGYDj1BhXlcDDal8zaihK17mt6eWAd1pt6eycIpjkg84D1gM9P7HDW7ELUCg9C1JZOionE/SHOAh4AfG6KjVREoNSLoL6AYG/PnfAQ9Kaqot47JI7Gsdaqg6pyh3i6auBT5Hii52OfAWMBc3ffYH50Yr05WSLgnOmYHLraYBD+e4YZ1Yg6QW4B3gF2CpmZ0CNuFmmnB3I08k8rUeNdSC08hHKZL2475c6QP24TbK7wQO4D7BGjCz63zbKcDvwDfAxcBk4H2ciW3AlcCjZvZyGlJpkVBDM9AL/InbAjoaxPkCuBG41cwO5sg/ka+11JD2zVStOIWr4RW4HG8eLo+4Grfntdm3C3O7hbhV5yFgCfAVbkrqwL2bbs27k3pUpEHSNcAHuD3XpaGZHp3++HwOnENU7Gs9aqglp8yf+RUokAeKD6cL/C/wL5TCgdasaFEqAAAAAElFTkSuQmCC\n",
      "text/latex": [
       "$\\displaystyle a b - a x - b x + x^{2}$"
      ],
      "text/plain": [
       "                   2\n",
       "a⋅b - a⋅x - b⋅x + x "
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "expand(_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAK0AAAAVCAYAAAA0Nm5bAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAHeZh94AAAFk0lEQVR4nO2aa4hVVRTHfzNqammZBilppT3mQymiiBEaqZlUHzTpg0ZTU/ZAMSPp4YSy+htZpuSjNBDzSVChUegHlVKp7DnmSJZaWZqhoZRY9hJz+rD3qTNnzr0z99x77nXi/mDYw9mv/1p3n33WXudUNDQ0UKZMa6Jt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krr4FY+ajpwnhnXY1TmyTtIakmf7futDlI77sRjzBY21/hvpbfbkpkzgzG5GpLh98hmQubqfqDjxEljhPUiXON99lGzcFvYl9mKuNAWY2P2asGtyiXZE05ZVUTxyVfsBeQD9ga8yC7YI7gEHjNzKHcXdOVYaxA4d3jVZI6gE8AHxNlkWbBpJuBlYAu3A27wXulZTJDnA2VpDbrlIIEvkwoY2pUWg9QbwaPNL6+DgqmKwbLgfbExcm1Ad1ZtYAvAtcIOnymLGDU+94n2kIxuyEi8/aA1MyPPZSQdIQYA3wAzDKzI4C03FPnNlZul7jyy3pKmxCzj7Mw8ZUSENPJYAfaDNwBfCxpOd8imIv7hXtaeBLM4vGa0GieFREaFvcHbUDOAnUS5ojaSHuDdoI4GEz25BEdBJ8Yn497sOLkT4jgpmtwYU9oyUNzdD9Rlw++q0iSAWS+TBPG9OwIRU94czAOFxc2wsXa1yGy6PN8u3qmvR2i/YI7pAW5ircAa0O59zPcY+yGtz78+FmtjBXsUnxT4INuDz0KDPbF2lS68s5MX3Pw+UL15vZwTR1RsjJh/nYmAZp6sn700T/we4sYEBMHrHVI+lBYCEw1MzeL7WeMoX5ymse8D0ws7mGrQ1JHXE7wtrygj1zyHvR+ji3GqgLHxb+J1wKLMG/iSlzZvAPULWpYO6oQXUAAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle a \\left(b - x\\right) - b x + x^{2}$"
      ],
      "text/plain": [
       "                   2\n",
       "a⋅(b - x) - b⋅x + x "
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "collect(_, a)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAKMAAAAUCAYAAADho41NAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAA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tmhxPWFwJsdxG9tYThsVccRoNxvx/LSYCZTe2mQ2lYjSOgS+tA0kL/sjlLgZnVxmW+JTEdqD/WloSv8JfiTpZhwCMk5zmF9f1wn+X72FRoDgtXdFvK/M1+bMpSEoLHPDiMXpH7cJE9pqeOdMPRkcA4YEtCIA7FFS5wHJ4oSLoBqAe243zcCdwnKYuHMbj2TWtMHoxDj0IwdsmtJQ0HHgS+pUgw5o28ODwSjGbWAbwHnCvp4pz9LVxNo33eA4Ckclw/bgTuum7tujUcJE0G1gI/AlVmdgCYj7sxsqr6K/y4OSoMzCF0VtK3+8odAP9YrREYBMxOucKDIE8O433GQsOyKh9XHbyDm4BLgE8kveBbATtxj83aga/MrCf5VK/gG8brgYPANF/RY2ZrcenCdElTUrZfh+slvpMwF4RDSQNwp04LcAholbREUh3uic9U4FEz25Cn3SI+VZIjh0nBuB9XTOSN23B540hcLnERrg+1yPuRmS/mCX9qbcD1PavMbFdsyTw/LknYexZwE7DezPYkqA/F4WW4wqgZF3hf4K7lGtwz6mvMrC5nm6kIwWFZ/M+1kubhAmR8Qh/rpIekh4E6YIqZfZCypsRhBtI4TPrXzovAD8DChLmTGpKG4H7x69IC0aPEYQqyOOwSjD5vqwaao0lyCQCMApYDj2UtKnGYiVGkcPgf4y5Qf+M1w+sAAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle \\left(- a + x\\right) \\left(- b + x\\right)$"
      ],
      "text/plain": [
       "(-a + x)⋅(-b + x)"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "factor(_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAKEAAAAUCAYAAADlVl1wAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIW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JoJDsOM+Ev6YQ/+jGM4QCY2YwBKgrxAu7i+7QBJC33H9uKCTCzxnDOtxfmAM8PpL0gqQpXxbWHrZYS5wbhruPbYCk2f/lQ3FFg/Ro/biwmJCsOs+QvGQq7gD24MJkpJI0FJgNbUhywGleQQHnfAuT8eMoAz030Z9uD+Wj8eeSdsE/eLGkUcAfwNSWcMENkxt9BJzSzbuAd4CRJZx+igSHyYWi8z20AkDQS11MbgwvL7X2PxoGZ7QN2AKMlXR+uS5ogaXDK0fP92CsEReYPeirjG30lnrdzBC5HHAYsKhCqM0eW/IXN6mbgOlys35WNuWBmeyRtxvWRPpC0Cdeonu2NOQB8YWYDyZmywFLgVWCDpAW4V2HVwHm4VtKolDNX4HqBr6SsReFP0hBcJNmOe9vQLqkF53jXAqOBe83srax09hOZ8Bc2q5txuc38CAbfgMsLx+I662cBi3E9rUGUyAdjwMzewL1xeBO4AFftXYVLtu8P90s6HrgaeN3Mvk8RGYu/c3AFTxswA/gMF34bcD/8dDNbmbHOksiKv1z4p1ZJy3COUZfSizqiIeluYCVwiZm9V2BPhb8CKMRf2r9ongK+A5anrB2xkDQcWAY0F3JAjwp/KSjGXx8n9HnZPKAtmQBXwDjgWVLCTBIV/gpiHAX4+wcbliPcfnK5TwAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$\\displaystyle \\left(- a + c\\right) \\left(- b + c\\right)$"
      ],
      "text/plain": [
       "(-a + c)⋅(-b + c)"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "_.subs(x, c)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAIAAAAAUCAYAAABFyTWeAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAH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AZsTNr8Ol/xBdV/HCr48qcxxE/zYjqA+kT2m6AD0yHMk1QN3At+ScQByVm78+w+AmXUD7wEnSDorNihyW+N8LARA0ijcnXkMLhR0UCWZ2R5gKzBa0vVhu6TxkoYkDD3Plwe5zQz2SNEN4EZ/Y4jWGYnLCYYDC1LCQ+7Kkz98CGoGrsPFl+1+sV2SNuLumR9J2oB7BJrlJ9oHfGVm5cS3PLQYeB1YJ2ke7nm2DjgXd12tTxhzOe6u/1pCWw92AElDcR6wHfeK1iGpBbfp1wKjgfvM7J1cqEpXLvzhQ1AzLh7ODepvwOUBY3EvTmcCC3F33hqKxP++kJm9hXuJexs4H5cVX4VLjB4I+0s6FrgaeNPMfkyYMo39bFxy2ArMAL7AufybcR/6dDNb3luecpUXfyH8hxBJS3Ab25hw3x2wknQPsBy42Mw+SOkzKNkhnT/pr4FPAz8ASxPaBqQkjQCWAM1pm+816Nghm7/HAfCxfA7QGk94BrjOAJ4nwTXGNUjZIYP/P9la9jEOG8hJAAAAAElFTkSuQmCC\n",
      "text/latex": [
       "$\\displaystyle \\left(a - c\\right) \\left(b - c\\right)$"
      ],
      "text/plain": [
       "(a - c)⋅(b - c)"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "simplify(_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 17,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAADAAAAA1CAYAAAAHz2g0AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAHeZh94AAAEL0lEQVR4nO2aXYhVVRTHf1MmZQaR9CI2LwlhRTNjPsyDSGTNNErQx0NQSgw9BZIZRToYf/9JX/RBEEL4UENRQUhGaKUVRIZBPjiVxFgGUQqFNlHYZAZzezj7NGfO6D2f15mB+cFwz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4IDtbbZ3TpUxZUjvQpuJvqyrBdsrgIeB64GFQL+kwbr0Q8oBSb/XqRyYDxwCXgt/tfP/NpquOdY9kO2TwLpWzsCEmmNi4AFgIENPX1be3iqSDnSSqDkmeJmoPtOMshf5yqRnYCjdIWSe0yb7TJOegRfSHWZECJ2p5phgRoTQpJpjTJUQsj2f6IdQEB2a7eEyP1LX98bxSTyp5lgTy4h+V3QQuAhweH68rgH+AyTYdeepK/JbAAAAAElFTkSuQmCC\n",
      "text/latex": [
       "$\\displaystyle \\sum_{i=1}^{n} x^{i}$"
      ],
      "text/plain": [
       "  n     \n",
       " ___    \n",
       " ╲      \n",
       "  ╲    i\n",
       "  ╱   x \n",
       " ╱      \n",
       " ‾‾‾    \n",
       "i = 1   "
      ]
     },
     "execution_count": 17,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Sum(x**i, (i, 1, n))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 18,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/latex": [
       "$\\displaystyle \\begin{cases} n & \\text{for}\\: x = 1 \\\\\\frac{x - x^{n + 1}}{1 - x} & \\text{otherwise} \\end{cases}$"
      ],
      "text/plain": [
       "⎧    n       for x = 1\n",
       "⎪                     \n",
       "⎪     n + 1           \n",
       "⎨x - x                \n",
       "⎪──────────  otherwise\n",
       "⎪  1 - x              \n",
       "⎩                     "
      ]
     },
     "execution_count": 18,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "_.doit()"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Define Equations"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`Eq`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAHgAAAAUCAYAAABGUvnzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcn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0cA+wrxs9hxK/F5wGwo10DW+VwG2Eld6e6mvtQdcE4BxgSzcZdLyQfuhG/nRz7SumE+4QdvU0KBmiNxAmsUvZYfvp6GdzWkGUda8ADgLDCWdCj+dRvpDUmMNuLcHB6/Isk+Lw3N5Nf7xrt+ew2W+uhTyDbQ8mZMutvR0NpZHASGASsC2Hc8sJyRWkbn1s3wKsA9qAGwmZ9322GyV9nQeZLBE7uEs+YbsCuB/4lpSDC8C1jsKdwSVRe1FvSuIdfCxqx9geJOlvANvDgNeBEYRQ3RoL2q4G3gR+BKZLOhRl25sImfbMvnPJFHEOMcd2Q5x5RknTeqAMeDAZvgvBVdKlhSIg6ajtNmCC7TslbUz2274c2C/pxKkky/ZOQi3VQqinKoCbCTF+FtAm6YpobCWwGzhKKDP2J5R/AlwFXC9pT6FIpdGfmyzbpcBvwJfAucBAwi4pI3C8BKiT9EJCppIic80F2zOAtwm7eSvhyrUcuJJQ6lZA5wx5NuEcHkk4Vy4j1HgN0bjmSPFY4F1CzTw9SThCfdQ+V2hSBcB4wm1VMyHMfk4IybWECapJOfdfy1XSO4Tbt63AtcDDwK2ExOuReFzRPheeRTYo5teks8gA/wCa5OsU9h3DnAAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$\\displaystyle a x^{2} + b x = c$"
      ],
      "text/plain": [
       "   2          \n",
       "a⋅x  + b⋅x = c"
      ]
     },
     "execution_count": 19,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "Eq(a*x**2+b*x, c)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Solve Equations"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`solve`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAHgAAAAUCAYAAABGUvnzAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zL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Cycoew+O8mtYbo+dUC1kvZM/Pm6ueypoIq674TX2OUcia09TyKiFl92J2qPJy5gywx6vC8qp/xetcu6sPmkLm2k0Nmbqlkyyv+6WgYVgnshgOwpA/njlSSKxq3Ppl5AuZiZSX/IS7KzLEDXWwXUDt4vXwiM0fjYnys4eCNjGtP1e78TxPr8/WXqt2zOqNAZu6IxzBGCdUrWsYm4gl8gckRsRo3KFFhbaa9EaLOIc7KzK3rzippmocRuLw1fG9sXCNijfKi7ZqZpzfHM3OfupRbm2Rl5otKLbVcqadG43glxk/Byog4sJo7DkuwRikzPm1R/gYOxpERsXTDUBzaLVBmDscPeB9bYTMsVJw6Bbviyoi4t0VmnA3E9V/exp2Ip5Td/Kxy5ToSByml7mjWzZDPVM7h3ZRzZS+lxru1mresUrw3nlNq5smthCvMqNo7BrPgDmFf5bZqGY7Bu0pInqo8oEkN5260XCPiGeX27VkchqtwkpJ4XV3P69rnwk3oDLr5NWkTOoC/AC2a3+dO6xAaAAAAAElFTkSuQmCC\n",
      "text/latex": [
       "$\\displaystyle a x^{2} + b x + c$"
      ],
      "text/plain": [
       "   2          \n",
       "a⋅x  + b⋅x + c"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a*x**2 + b*x + c "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 21,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAeEAAAAeCAYAAAAb+aZ2AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAHeZh94AAALYElEQVR4nO2de7Bd0x3HP7dEokKDEU0bVczEZIgh8RhKJ6qhqi2Jth6DRPUxjElDB4mR/ny1MrQToq1H6xVJGXS0aSVUS9RbVCpBUaUubUNQ706DcPvHbx85Odn73L332Xufc671+Wffs9daZ/3O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bBUG/mR6PADk6YTN7Q9Ip+IPrpKWWzLSh8PKyMLLnjjbb0YzDgdm4cI/Hz0M9Obp+lYYlEzNbJD9pZzq+p3N/fMbwCP6Mrkp2wJ13HsS3JvwUn0WBL9kdVdQsTtKngXfMLPZUHPkBCIcA95nZyoawybiA38P3C06NeebXW+s4czausMbpo5DOqwz9dpF2Iei3bIJ+M5JnJoyZ9Uq6Ok/aJlRWeC1yCzCvhFWATJjZmSTsnYtGhcfEhZFwfrCZ3YVXxkKIKu/cHOmWs7aNkwoyKY6V1nxj/a7AVsQ3ZNtE1/WAaQnp72Dt/0GmxjViDPAmTZxKslKCfrtFuxD0m4qgX6AY/fZLT1/fmhPbopHFM8CGeXr0QGAgIWkWMAPY1syeaUP+w3Dvy9lmFt53GwhkoN36rbOjDxhtCcdwNs6E38bXxy+MEs43s05etgkEymQisLyNAt4HP0LvvDblHwh0M23Tr6S9gG9EH5cCiSelrTUTDgQCgUAgUB1p3yccCAQCgUCgYP4PFX1n0OkYRM0AAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle \\left[ \\frac{- b - \\sqrt{- 4 a c + b^{2}}}{2 a}, \\  \\frac{- b + \\sqrt{- 4 a c + b^{2}}}{2 a}\\right]$"
      ],
      "text/plain": [
       "⎡        _____________          _____________⎤\n",
       "⎢       ╱           2          ╱           2 ⎥\n",
       "⎢-b - ╲╱  -4⋅a⋅c + b    -b + ╲╱  -4⋅a⋅c + b  ⎥\n",
       "⎢─────────────────────, ─────────────────────⎥\n",
       "⎣         2⋅a                    2⋅a         ⎦"
      ]
     },
     "execution_count": 21,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solve(_, x)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Solve Systems of Equations"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 22,
   "metadata": {},
   "outputs": [],
   "source": [
    "z = symbols(\"z_{0:2}\")"
   ]
  },
  {
   "cell_type": "code",
   "execution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RBEARBEARBEARBs/l/Aourlx0lfO0AAAAASUVORK5CYII=\n",
      "text/latex": [
       "$\\displaystyle \\left[ \\left\\{ z_{0} : - \\frac{a}{2} - \\frac{\\sqrt{a^{2} + 4 b}}{2}, \\  z_{1} : - \\frac{a}{2} + \\frac{\\sqrt{a^{2} + 4 b}}{2}\\right\\}, \\  \\left\\{ z_{0} : - \\frac{a}{2} + \\frac{\\sqrt{a^{2} + 4 b}}{2}, \\  z_{1} : - \\frac{a}{2} - \\frac{\\sqrt{a^{2} + 4 b}}{2}\\right\\}\\right]$"
      ],
      "text/plain": [
       "⎡⎧                __________                  __________⎫  ⎧                __________                  __________⎫⎤\n",
       "⎢⎪               ╱  2                        ╱  2       ⎪  ⎪               ╱  2                        ╱  2       ⎪⎥\n",
       "⎢⎨         a   ╲╱  a  + 4⋅b            a   ╲╱  a  + 4⋅b ⎬  ⎨         a   ╲╱  a  + 4⋅b            a   ╲╱  a  + 4⋅b ⎬⎥\n",
       "⎢⎪z_{0}: - ─ - ─────────────, z_{1}: - ─ + ─────────────⎪, ⎪z_{0}: - ─ + ─────────────, z_{1}: - ─ - ─────────────⎪⎥\n",
       "⎣⎩         2         2                 2         2      ⎭  ⎩         2         2                 2         2      ⎭⎦"
      ]
     },
     "execution_count": 23,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "solve([z[0] + z[1] + a, z[0] * z[1] + b], z, dict=True)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Solve Recurrence Relations"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`rsolve`"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "$$\n",
    "\\begin{aligned}\n",
    "y_0&=1, \\\\\n",
    "y_1&=4, \\\\\n",
    "y_n &= 2y_{n-1} + 5y_{n-2}\n",
    "\\end{aligned}\n",
    "$$"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs":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TpJf471EtrEOAF0gY/pC0DLem7uC4OL1Il33T+AE7AreguqfJWbtQQf22WT+gszoSZ59avxF02TeFaTeqpwlwtv90us5qFm5N0W/DAWZ2Pu6Fqw8CM9oY0ukWi3DDEIlDCJKeNrObcIu9v4r7EQHAzGbgdrxYTfxswiYb+V7CKVGRzewC3LOMYcVvw3UScFHMmrEg38S9pPWeFvF6jW75BlzLeqGkpE0Deom8tAvV1W+q+gEd15FI+9T6TaRbvoGCtBt50/TrieaZ2S5+1tM6zGwmbld4gPf44wFmdo3/+0VJZ5rbBWMmcL9Ceyea2Yk4wb2N67LPjRjCWC7pmvDJLnILbix9ZYq4X8EJ4VK/lmgpbvurmbj/8ZSo4a0kG2XFzLbDzRYbbhVX0lNmdquZHSEp+PaOmaTwcR7lzUjhvgEws82AGbgtySpBHtr1caus33bqB2SoI0Vo1+fb7/ot3DdQrHZjd5UAvgicY817SA7i3g5/Iu5OD7BT4Nxsf24fYDLRuys09lPcAJgHKOIzJ/V/UQCSVuG2A0sTdyWwN25vyV1wraJpwE3AgZLiWv1JNsrKxcDJacfwJV1H84L4QdL5uBS65Btwb0Y4O0WLv9foVLtQYf22Uz98/Cx1pAjtQp/rt0u+gQK1OzAyEv8M2cx2AyZL+kO7GZvZd3Fd8J0kxT4zGsvkbSMzOwgYr3Le5VjTQ3SiXZ++1m8CRdin1m81SOppIulRWq+liWMW8FAtuETyttGSWnA10LF2odZvK4qwT63fCpDY06ypqampqalZT2JPs6ampqampmY9/wdmeXxumf4lYwAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$\\displaystyle \\left(\\frac{1}{2} - \\frac{\\sqrt{6}}{4}\\right) \\left(1 - \\sqrt{6}\\right)^{n} + \\left(\\frac{1}{2} + \\frac{\\sqrt{6}}{4}\\right) \\left(1 + \\sqrt{6}\\right)^{n}$"
      ],
      "text/plain": [
       "⎛1   √6⎞         n   ⎛1   √6⎞         n\n",
       "⎜─ - ──⎟⋅(1 - √6)  + ⎜─ + ──⎟⋅(1 + √6) \n",
       "⎝2   4 ⎠             ⎝2   4 ⎠          "
      ]
     },
     "execution_count": 24,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "y = Function('y')\n",
    "f = y(n) - 2*y(n-1) - 5*y(n-2)\n",
    "rsolve(f, y(n), [1, 4])"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Differential Calculus"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`limit`, `series`, `diff`, `integrate`, `Derivative`, `Integral`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAB8AAAASCAYAAACjMAXnAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAHeZh94AAAB6klEQVR4nMXVT2jPYRwH8NdYcphdHLgoLflzYQcHhzWl1iSyrZWStQOXHSTiQPTpkyhxUMrBhRIH+ZODMIWsXJxWLg4jf5LCQfnXyubw+66++9m032+Ld33red7P5/t+93mez/N5GsbHx/0vNJYnmdmLjWjFOizClYjY9TeRzFyC9zgfEXvrMsfRwvQr3mH1DHW2Yx5uztRY8UMZ+7ESzRioQacbn/GkFvNJmUfEo4lxZs5IIDObsQlXI+JXiR9EB3oj4kaJb8BF9FdnXg+2YgFuVfGHMIbjmTm/xJ9BPy7MhXk3vmGwTEbEMC5jDfogM4/gAK5hoLrgakJmLsRm3I2In1OEHMMORGY24QTuoy8ixmabeQea/LnlICLe4iyW4xyeoiciRvmz2mtFD0Zx5y8xH0vj3RHxfWJSt3lRRNvwMCK+TBOzU6XAPhTUvvL6bDJvx2LTbHlmbsElPMdavMCezFw1F+bdKlfp9hTGbbiu0iU7I+KjSvdsxKmJuIbyw5KZXegqpkvRiZcYKrhPEXGwaBSv8SYi2qqMW/EYP9AWESOltWdYj/aIGKq+aq0qDaCMluJTGB4sBJapVHLZeAXuYbzIeMRkHMYDnMaGhnqe1Mw8WQi1RMSrmgUK1Hvm3RiejTFVZ/6v8Rvll5mKJbWSawAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$\\displaystyle \\frac{1}{x}$"
      ],
      "text/plain": [
       "1\n",
       "─\n",
       "x"
      ]
     },
     "execution_count": 25,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "diff(log(x))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAcUAAAAcCAYAAAAQh6TXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAHeZh94AAANwElEQVR4nO2defQcRRHHP79wGcGESxPlCjwOUdSIyqEcCRiCHEogHqiRiCDiE0QMQhBf5csZFCUgl4iagCAiEY+IRMMhREQEEg4RQSXIjVzhoaIS4x/VE+e3v5nZ2dnZ2V2Y73v75rcz3VW1XdXT3VXV/RtYvnw5NWrUSIakUjuImQ2USa/bkLQ38A8zu7oCXrUuSkavtqmkbYC1zeyqMui1goF6UKxRIxmS3ga8w8zO67YsvQhJWwJHmdmBFfCqdVEyer1NJX0VuNDMbq+S77AqmdWo0WfYE/hZt4XoRUgaBnwTOLYilrUuykevt+nxwDmSVqqSaT0o1qiRjg3N7MFuC9GjOAB4yMweq4hfrYvy0dNtamZLgbuAqVXyXblKZt2ApOnAvsAWwL+Am4DpZnZXVwWr0dOQNAqo6oXfV5A0AEwHPlMRv1oXJaOP2vRbwA8lXWxmL1TB8OWwUhwHnAO8E9gFeBFYIGntbgpVo+fxHuDKbgvRoxgHbAhcUxG/Whfloy/a1MxuBoYD762K50t+pWhmE+PfJU0BlgLvAn7aFaFq9AO2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{3} + \\frac{\\sqrt{3}}{3} \\right)}}{3}$"
      ],
      "text/plain": [
       "                         ⎛2⋅√3⋅x   √3⎞\n",
       "   ⎛ 2        ⎞   √3⋅atan⎜────── + ──⎟\n",
       "log⎝x  + x + 1⎠          ⎝  3      3 ⎠\n",
       "─────────────── + ────────────────────\n",
       "       2                   3          "
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "integrate((x**2-1)/(x**3-1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAALQAAAAcCAYAAADIgpWxAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAHeZh94AAAJMElEQVR4nO2be7BVdRXHPzzVSMBAuUmakEJI5RHxVYoQrxBMbtrDHsA4qdkoqRAK2iy/GYjlCDpWZJTgBBEjQTOIkIakiEryVNDRCgwSUKA0TSOQ/li/c9l3s/c5Z99zLgSe78yZBb/n2nut33r99m2yd+9eskBStgkFYGZNKrVWFVUANMmi0JLOAM40symNx1IVVTQcTTOOHww81BiMVFFFJZBVoU80s02NwkkVVVQAJSu0pA7A1kbkpYoqykYWCz0IWNBYjFRRRSWQRaHPBp5uLEaqqKISaF7KIEktgD1m9l4j8/O+hqSTgA3AdDMbcXC5cUiajnvnTmb2dgPXOAN4FrjCzKZWkr84SlJo4DxgaVKHpDuAnkAXoD3wDvAKMA+418x2lM/mfnt2AF4FfmJm14a2S4ELgBxwGnA0MMPMvl5krcHAd4BTgXbAFmAFcJeZPVVp3g8lSDoT+AYwOq7MWeRuZiskzQNukzTLzN4qsGedbIFbgVq8uvZJoCOwC3gOuB+4P25kSw05BgKLUvquB1oBjwB3AzOA3YGZtZJOKHGPLLgY5/23kbZbgGtwhf57KYsEocwH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T+AE6n+7kbTe8PAbGNo6R9oujQ4OV6kX4snvetxKjMKtyAJgoJndXWC/AwozuxG4DL8QGobfAjbFQ8P+oSQXxdXADXjS/S3gq7i8+gOt2Rdnp2EOHksPS+jLLPdg0YcC82N/9VRItp0CbYaXBS3hNyI6IdMfyR4shFuysUBnM9tQbHwV6ZB0Cl6FmGVmlxUZOxYPUeo+PShj32vx8uj5ZrY00l5R2Wb9m8KDhVpgTVWZS4ekmlBViLZ9AC8zQmnJ9STgb7jbL4eXo3ClnRNV5oCKyvaQsNBVZIekiXiIsgSvWtQAffGKyMPA4Fi5NG2dXkAf4M4yPvDvxr5PGTY2ZI1SUVXowxSS+uLX0jk80d6NhxozgcmRb3UOK1QVuorDCodKDF1FFSXhfxx2nnmMUo+KAAAAAElFTkSuQmCC\n",
      "text/latex": [
       "$\\displaystyle \\frac{\\sqrt{3} \\pi}{18} + \\frac{\\log{\\left(3 \\right)}}{2}$"
      ],
      "text/plain": [
       "√3⋅π   log(3)\n",
       "──── + ──────\n",
       " 18      2   "
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "integrate((x**2-1)/(x**3-1), (x, 0, 1))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAPgAAAAVCAYAAABrCyNXAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAHeZh94AAAJyklEQVR4nO2beZBdVRHGf5OAbGJigQEElYAJgoKRRUAgJIYQNpHBoAiERFaRXfYl9fGBYFAkQWQppCSRTdEEFFlCGYLIHjBBdmQJCRJUwCCrGBL/6HOpm5t337z35r2ZqmG+qqlT79xzuvv2PX1Od5+etiVLltCLXvSiZ2K57hagmbB9OHAosG7qegz4gaSbuk2o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} + O\\left(x^{6}\\right)$"
      ],
      "text/plain": [
       "     3     5        \n",
       "    x     x     ⎛ 6⎞\n",
       "x - ── + ─── + O⎝x ⎠\n",
       "    6    120        "
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "series(sin(x), x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAA0AAAAPCAYAAAA/I0V3AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAHeZh94AAAAi0lEQVR4nO3SIQoCYRQE4E+xajYbxObewGjdYBTMRmGj8PgP4zkM3kMQjEb7Wv6wrC6sxeTACzO8YSbMoK5r32LUJCmlDVYosMQYp4jYdppwzM9P3LH4lDRs8QPmmGDfq15EnBtVuzxvSb3wN/3cNGgONqVUosx0ijWuuGTtERFVe3sFdi1tlg9uqF5xyRu/uhi7owAAAABJRU5ErkJggg==\n",
      "text/latex": [
       "$\\displaystyle 1$"
      ],
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 29,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "limit(sin(x)/x, x, 0)"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "## Solve Differential Equations"
   ]
  },
  {
   "cell_type": "markdown",
   "metadata": {},
   "source": [
    "`dsolve`"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [],
   "source": [
    "f = Function(\"f\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAQQAAAAhCAYAAAA/HtU7AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZ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NML86bJGFS0oaAE1n5D0Yen4Gm0Qqh4UEQMsDwI/UThVWMDBHgBHahUU1EjbdXwNNQhxJ9SJwKGEfdM/Iuyhfht4MS6vzCZ80XdhlFlE2Ea51hqroO1ou46v3//fjgUFazO2jyOckLQpYVTwO8Jy3UaELwUfBx6TdHJC5k5gG0n75q5wkxQNQkFBwWrWishnQUFBPhQNQkFBwWr+D8axzLPV/GJ5AAAAAElFTkSuQmCC\n",
      "text/latex": [
       "$\\displaystyle a \\frac{d}{d x} f{\\left(x \\right)} + b f{\\left(x \\right)} + c + \\frac{d^{2}}{d x^{2}} f{\\left(x \\right)}$"
      ],
      "text/plain": [
       "                            2      \n",
       "  d                        d       \n",
       "a⋅──(f(x)) + b⋅f(x) + c + ───(f(x))\n",
       "  dx                        2      \n",
       "                          dx       "
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "diff(f(x), x, 2) + a*diff(f(x), x) + b*f(x) + c"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAegAAAAeCAYAAADn7I28AAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjcuMiwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8pXeV/AAAACXBIWXMAABJ0AAASdAHeZh94AAAPGElEQVR4nO2de5QcdZXHP5OABEVceQksBBbZRBHCkOgmPOVhiIiYCbC48YjE8BJWYOThJlk8ly8vQdcl4BGV42J4xM0KwUgS0UiUg4BCQIaQAILsBkGCgEEiKGJw9o/760l1ddV0V093upv8PufMqZ56/OpWd33r97j3d6urv7+fSOcgaSvg3Wa2rNW2DAVJb+obz8y6Wm1DJJ921FHURCRNV6ygOwdJw4FLgFlm9rdW21MvknYCDjOz61ptSzOQNAYYa2ZzWm1LpJJ21FHURCSLYa02IFKI6cCSdnmoDIGPAEtabUSzMLPlwFhJ27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4Bfp6aLob8hSFj8I7vW4E++bsoNsN91jsCvWaWmZM92YOupYJ+HvhUOPHu+PzDfrzn/GRq/5lh+eV0QfJXmPUAi8zs6ZzzNQ0z6zezE/GMPYvw4Jp/xTMcjcFb/9PwXOFFy16CT16fj0funYnPcXsvcDvw6SFfQCTSYIaqCXlaxqn4NK2ytIxRE5FOxMwW4y6f2/D59J/D/cwv4TN6Srwfb8Smc2+Dp/ccgWdlOwyfd38qrqWVuF6uyjgOSM2DrkaYUnEpMDY50books7AW+wHmr+VpaOQ9Arw2ZxpVpHIRoXK0zI+2mp7IpENiaRL8Q7pbmZWNei5CHmvm8zjCuAz+FSKo+o5YcjeMxOY30mVc/AXlPzvw4CRYYh/jZW/vCIS2Whop7SMkUiLmAI81OjKGQomBjCz13Ax3p90dhdkV/wl4OdW2a/deD/uR3gQn7+t8Dnr7SyRyMbC6Xhw6VJ8tkfpr9P0HYnUhZm918y6m1F2oSHuSCQSiUQiG4b/Bw9aDkMfoLYRAAAAAElFTkSuQmCC\n",
      "text/latex": [
       "$\\displaystyle f{\\left(x \\right)} = C_{1} e^{\\frac{x \\left(- a + \\sqrt{a^{2} - 4 b}\\right)}{2}} + C_{2} e^{- \\frac{x \\left(a + \\sqrt{a^{2} - 4 b}\\right)}{2}} - \\frac{c}{b}$"
      ],
      "text/plain": [
       "             ⎛        __________⎞          ⎛       __________⎞     \n",
       "             ⎜       ╱  2       ⎟          ⎜      ╱  2       ⎟     \n",
       "           x⋅⎝-a + ╲╱  a  - 4⋅b ⎠       -x⋅⎝a + ╲╱  a  - 4⋅b ⎠     \n",
       "           ──────────────────────       ───────────────────────    \n",
       "                     2                             2              c\n",
       "f(x) = C₁⋅ℯ                       + C₂⋅ℯ                        - ─\n",
       "                                                                  b"
      ]
     },
     "execution_count": 32,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dsolve(_)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "@webio": {
   "lastCommId": null,
   "lastKernelId": null
  },
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.12"
  },
  "vscode": {
   "interpreter": {
    "hash": "e82bdbec295f1d416caad911bfe8299822751c36b2e078ad810889afff869327"
   }
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
